package ysq.xyg.host.model.po;

import lombok.NoArgsConstructor;

import lombok.Data;
import ysq.xyg.base.util.BaseConstant;
import ysq.xyg.base.util.BaseUtil;
import ysq.xyg.sys.model.po.SysUser;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * 房产模块-更多模版实体类
 *
 * @author congcong tao
 * @date 2020-3-6 10:12:30
 */
@Data
@NoArgsConstructor
@Table(name = "xyg_host_item_template")
public class HostItemTemplate implements Serializable{

	/**
     * 主键
     */ 
	@Id
	private String id;

	/**
     * 应用主键
     */ 
	@Column(name = "account_id")
	private String accountId;

	/**
     * 名称
     */ 
	@Column(name = "name")
	private String name;

	/**
     * 默认值
     */ 
	@Column(name = "value")
	private String value;

	/**
     * 单位
     */ 
	@Column(name = "unit")
	private String unit;

	/**
     * 备注
     */ 
	@Column(name = "remark")
	private String remark;

	/**
     * 排序
     */ 
	@Column(name = "order_num")
	private Integer orderNum;

	/**
     * 删除状态1、未删除2、已删除
     */ 
	@Column(name = "remove_tag")
	private String removeTag;

	/**
     * 创建者
     */ 
	@Column(name = "create_user")
	private String createUser;

	/**
     * 更新者
     */ 
	@Column(name = "update_user")
	private String updateUser;

	/**
     * 创建时间
     */ 
	@Column(name = "create_time")
	private Date createTime;

	/**
     * 更新时间
     */ 
	@Column(name = "update_time")
	private Date updateTime;


	public HostItemTemplate(SysUser sysUser) {
		this.id= BaseUtil.uId();
		this.removeTag= BaseConstant.BASE_REMOVE_TAG_NORMAL;
		this.createTime = new Date();
		this.createUser = sysUser.getId();
		this.updateTime = new Date();
		this.updateUser = sysUser.getId();
	}
}